<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!Doctype html>
<html>
<head>
    <meta content="text/html" charset="utf-8">
    <title>党建</title>
    <meta name="keywords" content="务川,党建"/>
    <meta name="description" content="务川,党建"/>
    <link href="../../static/images/ico/favicon.png" rel="shortcut icon">
    <link rel="stylesheet" type="text/css" href="../../static/css/list.css">
    <script type="text/javascript" src="../../static/js/user/jq181.js"></script>
    <script type="text/javascript" src="../../static/js/user/list.js"></script>
    <script type="text/javascript" src="../../static/js/user/baseList.js"></script>

    <link rel="stylesheet" type="text/css" href="../../sys/resources/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../sys/resources/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" href="../../sys/resources/css/grumble.css">


    <script type="text/javascript" src="../../sys/resources/scripts/bootstrap.js"></script>
    <script type="text/javascript" src="../../sys/resources/scripts/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="../../sys/resources/scripts/bootstrap-datetimepicker.zh-CN.js"></script>
    <script type="text/javascript" src="../../sys/resources/scripts/jquery.grumble.min.js"></script>
    <script type="text/javascript" src="../../sys/resources/scripts/zhBase.js"></script>
    <script type="text/javascript" src="../../sys/resources/scripts/zhForm.js"></script>
    <script charset="utf-8" src="../../sys/resources/scripts/kindeditor-4.1.1/kindeditor-min.js"></script>
    <script charset="utf-8" src="../../sys/resources/scripts/kindeditor-4.1.1/lang/zh_CN.js"></script>
    <script>
        $(function () {

            /**
             * 提交后的响应函数
             * @param data 服务器返回
             */
            function deal(data) {
                alert(data.msg);
            }

            var zf = new zhForm($("#formId"));
            $("#btnid").click(function () {
                var isSuccess = zf.verify();
                if (isSuccess) {
                    zf.submitForm(deal);
                }
            });
        });
    </script>
</head>
<body>

<jsp:include page="../../themes/header.jsp"/>
<div id="middle">
    <div class="wrapper">
        <div id="middle-left-aside">
            <jsp:include page="left.jsp"/>
        </div>
        <div id="middle-right-content">
            <div class="news-content-wrapper">
                <div class="news-content-header">
                    <div>
                        <span></span>基本信息：<a href="/">首页</a> &gt; <a href="/privateinfo/index.do">我的党校</a> &gt; <a
                            href="/privateinfo/index.do">基本信息</a>
                    </div>
                    <span>基本信息</span>
                </div>
                <ul class="news-content-list content-list">
                    <div class="panel-body">
                        <form action="/privateinfo/editData.do" id="formId" name="form" class="form-horizontal"
                              role="form">

                            <div class="row">
                                <div class="col-xs-10">
                                    <div class="form-group">
                                        <label for="title" class="col-sm-3 control-label">用户名</label>

                                        <input name="uid" type="hidden" value="${sysUser.uid}" />

                                        <div class="col-sm-9">
                                            <input name="passport" type="text" readonly="readonly" class="form-control"
                                                   id="title"
                                                   placeholder="用户名" value="${sysUser.passport}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="row">
                                <div class="col-xs-10">
                                    <div class="form-group">
                                        <label for="realname" class="col-sm-3 control-label">真实姓名</label>

                                        <div class="col-sm-9">
                                            <input name="realname" type="text" notNull="true" class="form-control"
                                                   id="realname"
                                                   placeholder="真实姓名" value="${sysUser.realname}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="row">
                                <div class="col-xs-10">
                                    <div class="form-group">
                                        <label for="email" class="col-sm-3 control-label">电子邮箱</label>

                                        <div class="col-sm-9">
                                            <input name="email" type="text" isEmail="true" class="form-control" id="email"
                                                   placeholder="电子邮箱" value="${sysUser.email}"/>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-10">
                                    <div class="form-group">
                                        <label for="lone" class="col-sm-3 control-label">党员阶段</label>

                                        <div class="col-sm-9">
                                            <c:choose>
                                                <c:when test="${sysUser.lone eq '1'}">
                                                    <input name="lone" type="text" class="form-control" id="lone"
                                                           placeholder="入党积极分子培养" readonly="readonly" value="入党积极分子培养"/>
                                                </c:when>
                                                <c:when test="${sysUser.lone  eq '2'}">
                                                    <input name="lone" type="text" class="form-control" id="lone"
                                                           placeholder="确定发展对象" readonly="readonly" value="确定发展对象"/>
                                                </c:when>

                                                <c:when test="${sysUser.lone  eq '3'}">
                                                    <input name="lone" type="text" class="form-control" id="lone"
                                                           placeholder="接收预备党员" readonly="readonly" value="接收预备党员"/>
                                                </c:when>

                                                <c:when test="${sysUser.lone  eq '4'}">
                                                    <input name="lone" type="text" class="form-control" id="lone"
                                                           placeholder="预备党员考察" readonly="readonly" value="预备党员考察"/>
                                                </c:when>

                                                <c:when test="${sysUser.lone  eq '5'}">
                                                    <input name="lone" type="text" class="form-control" id="lone"
                                                           placeholder="预备党员转正" readonly="readonly" value="预备党员转正"/>
                                                </c:when>

                                                <c:otherwise>
                                                    <input name="lone" type="text" class="form-control" id="lone"
                                                           placeholder="未进入党员阶段" readonly="readonly" value="未进入党员阶段"/>
                                                </c:otherwise>
                                            </c:choose>

                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-10">
                                    <div class="form-group">
                                        <label for="differDateNum" class="col-sm-3 control-label">距离下一阶段的时间</label>

                                        <div class="col-sm-9">
                                            <input name="differDateNum" type="text"  class="form-control" id="differDateNum"
                                                   placeholder="距离下一阶段的时间" value="距离下一阶段还有${sysUser.differDateNum}天"/>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-10">
                                    <div class="form-group">
                                        <label for="title" class="col-sm-3 control-label">简要描述</label>
                                        <div class="col-sm-9">
                                            <textarea id="content" name="content" class="form-control" rows="25">${content}</textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="row">
                                <div class="col-xs-3">
                                </div>
                                <div class="col-xs-4">
                                    <button type="button" id="btnid" class="btn btn-success btn-block">提交</button>
                                </div>
                                <div class="col-xs-2">
                                </div>
                            </div>
                        </form>
                    </div>
                </ul>
            </div>
        </div>
    </div>
</div>

<jsp:include page="../../themes/footer.jsp"/>


<script type="text/javascript">
    var editor;
    KindEditor.ready(function (K) {
        editor = K.create('textarea[name="content"]', {
            resizeType:0,
            allowPreviewEmoticons:false,
            allowUpload:true,
            //是否可以弹出对话框选择文件
            allowFileManager:true,
            //文件选择的时候弹出的对话框/对话框中可以放置服务器图片文件
            allowImageUpload:true,
            uploadJson:"/file/imageUpload.do",
            syncType:"absolute",
            items:['source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
                'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
                'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
                'superscript', '|', 'selectall','title', 'fontname', 'fontsize', '|', 'textcolor',
                'bgcolor', 'bold', 'italic', 'underline', 'strikethrough', 'removeformat', '|'
                , 'advtable', 'hr', 'emoticons',  'image', 'insertfile','link', 'unlink'],
            afterCreate:function () {
                var self = this;
                K.ctrl(document, 13, function () {
                    self.sync();
                    document.forms['form'].submit();
                });
                K.ctrl(self.edit.doc, 13, function () {
                    self.sync();
                    document.forms['form'].submit();
                });
            },
            afterBlur:function () {
                this.sync();
            }
        });
    });
</script>
</body>
</html>